package cn.chinaunicom.sdsi.gacx.common;


/**
 * fileUtils
 * @author xp
 * 2018-03-12
 */
public class FileUtils {
	
	/**
     * 获取文件扩展名
     * @author xp
     * @param filename
     * @return
     */
    public static String getExtend(String filename) {
        if ((filename != null) && (filename.length() > 0)) {
            int i = filename.lastIndexOf('.');

            if ((i > 0) && (i < (filename.length() - 1))) {
                return (filename.substring(i + 1)).toLowerCase();
            }
        }
        return null;
    }

}
